<?php
/**
 * fldcms
 * ============================================================================
 * 版权所有 2017 福建华晟网络科技，并保留所有权利。
 * 网站地址: http://www.fldcms.cn
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和使用 .
 * 不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
 * Author: fld
 * Date: 2017-07-01
 */
namespace app\index\controller;

class CateController extends BaseController{
	/**
	 * 文章分类列表
	 */
	public function indexOp(){
		$model_article = model('Article');
		$result = $this->getCondition();
		$list = $model_article->getArticleList($result);
		$this->assign("article_list",$list);
		// 获取分页显示
		$page = $list->render();
		$this->assign('page', $page);
		return $this->fetch();
	}
	
	public function getCondition(){
		$result = array();
		$condition = array();
		$query = array();
		//分类
		$cate_id = input('param.id/d');
		if(!empty($cate_id)){
			$condition['class_id'] = $cate_id;
		}
		$condition['is_delete'] = 0;
		$condition['is_show'] = 1;
		$result['condition'] = $condition;
		$result['query'] = $query;
		return $result;
	}
	
}